import request from "@/utils/request";

export default {
    search(pageNum, pageSize, keyWords) {
        return request({
            url: `/advertisement/search/${pageNum}/${pageSize}`,
            method: 'post',
            data: keyWords
        })
    },

    addAdver(adver) {
        return request({
            url: `/advertisement/add`,
            method: 'post',
            data: adver
        })
    },

    updateAdver(adver) {
        return request({
            url: `/advertisement/update`,
            method: 'put',
            data: adver
        })
    },

    getAdver(id) {
        return request({
            url: `/advertisement/getAdvertisementById/${id}`,
            method: 'get'
        })
    },

    remove(ids) {
        return request({
            url: `/advertisement/remove/${ids}`,
            method: 'delete',
        })
    }

}

